# -*- coding: utf-8 -*-
"""
Created on Wed Jul 17 11:34:10 2024
Canny边缘检测
@author: LoongFly
"""

import cv2
import numpy as np

# o = cv2.imread("H:\\PycharmProjects\\OpenCV\\A5_Egde_Detect\\egde.png")
o = cv2.imread("H:\\PycharmProjects\\OpenCV\\A5_Egde_Detect\\lena.png")

r1 = cv2.Canny(o, 100, 200)
r2 = cv2.Canny(o, 64, 128)  #阈值越小，细节越丰富

cv2.imshow("Original", o)
cv2.imshow("Canny 1", r1)
cv2.imshow("Canny 2", r2)


cv2.waitKey(0)
cv2.destroyAllWindows()
